:root {
    --primary-color: #00f7ff;
    --secondary-color: #6e00ff;
    --dark-bg: #0a0a1a;
    --light-text: #e0e0e0;
    --glow-effect: 0 0 10px var(--primary-color);
    --error-color: #ff4d4d;
    --success-color: #00ffa3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    padding: 3rem;
    background: rgba(10, 10, 26, 0.7);
    border-radius: 15px;
    box-shadow: var(--glow-effect);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 247, 255, 0.2);
    max-width: 500px;
    width: 90%;
    animation: float 6s ease-in-out infinite;
}

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.5);
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 247, 255, 0.3);
}

input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 247, 255, 0.3);
    border-radius: 5px;
    color: var(--light-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--glow-effect);
}

.verification-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.verification-input {
    flex: 1;
}

#getCodeBtn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 120px;
}

#getCodeBtn:hover:not(:disabled) {
    background: rgba(0, 247, 255, 0.1);
    box-shadow: 0 0 8px rgba(0, 247, 255, 0.4);
}

#getCodeBtn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

button[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
    position: relative;
}

button[type="submit"]:hover {
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.6);
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: 0.5s;
    z-index: -1;
}

button[type="submit"]:hover::before {
    left: 100%;
}

.error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-shadow: 0 0 5px rgba(255, 77, 77, 0.3);
}

.success-message {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-shadow: 0 0 5px rgba(0, 255, 163, 0.3);
}

.links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.links a:hover::after {
    width: 100%;
}

.links a:hover {
    text-shadow: var(--glow-effect);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(0, 247, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 247, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
}

.loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 247, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto;
    margin-top: 10px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .verification-group {
        flex-direction: column;
    }
}